﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Data;

namespace SwimTeamManger
{
    /// <summary>
    /// Interaction logic for Window1.xaml
    /// </summary>
    public partial class Window1 : Window
    {
        public class Report
        {
            public string Name { get; set; }
            public int ID { get; set; }
        }
        public Window1()
        {
            InitializeComponent();

            List<Report> reports = new List<Report>();
            reports.Add(new Report() { Name = "Roster, Labels, Attendance", ID = 1 });
            reports.Add(new Report() { Name = "Design Roster", ID = 2 });
            reports.Add(new Report() { Name = "Top Times", ID = 3 });
            reports.Add(new Report() { Name = "Progression of Times", ID = 4 });
            reports.Add(new Report() { Name = "Best Times / Single Meet Results", ID = 5 });
            reports.Add(new Report() { Name = "Season Best Over Several Seasons", ID = 6 });
            reports.Add(new Report() { Name = "Improvement", ID = 7 });
            reports.Add(new Report() { Name = "Relay Combinations", ID = 8 });
            reports.Add(new Report() { Name = "Top Point Earners", ID = 9 });
            reports.Add(new Report() { Name = "Single meet Analysis", ID = 10 });
            reports.Add(new Report() { Name = "Multiple meet Analysis", ID = 11 });
            reports.Add(new Report() { Name = "Award Labels", ID = 12 });


            ddlReportsList.ItemsSource = reports;
            TeamManagerTablesTableAdapters.AgegroupsTableAdapter adapter =
                     new SwimTeamManger.TeamManagerTablesTableAdapters.AgegroupsTableAdapter();
            try
            {
                // adapter.ClearBeforeFill = true;
                adapter.Connection.Open();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
            finally
            {
                if (adapter.Connection.State == ConnectionState.Open)
                {
                    adapter.Connection.Close();
                }
            }
        }
    }
}
